<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><c:set var="cp" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Create User</title>
    </head>
    <body>
        <form action="${cp}/user" method="post">
            身分證號:<input type="text" name="twid" maxlength="10"/><br/>
            用戶名稱:<input type="text" name="name"/><br/>
            <input type="submit" value="驗證"/>
        </form>
        <c:if test="${not empty msg}"><span style="color:red;font-weight:bold">${msg}</span></c:if>
        <c:if test="${not empty errors}">
            <c:forEach var="fe" items="${errors}">
                <div style="color:red">${fe.field}:${empty fe.rejectedValue?"(空值)":fe.rejectedValue} 錯誤：${fe.defaultMessage}</div>
            </c:forEach>
        </c:if>
    </body>
</html>
